package com.aididi.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author ：xuzexiang
 * @description：
 * @date ： 2022/4/7 15:29
 */
public class DateUtil {
    public static final String DATE_TIME_PATTERN ="yyyy-MM-dd HH:mm:ss";

    public static String stampToDateStr(Long timestamp ,String format){
        String result;
        SimpleDateFormat sdf = new SimpleDateFormat(format);
        Date date = new Date(timestamp);
        result = sdf.format(date);
        return result;
    }
}
